(function () {
    NewsFlow = function (options) {
        var self = this;
        var defaultOption = {
            debugTxt: '',   // 调试信息
            $newsFlow: So.newsFlow.$newsFlow,   // 流最外层容器
            source: So.newsFlow.source || 'papi', // 数据源标示 NewsFlow.Source[...]
            query: So.comm.q,   // query
            type: So.newsFlow.type,   // 数据类型
            from: So.newsFlow.from,   // 数据来源
            logMark: So.newsFlow.logMark,    // 日志标示
            eventMark: So.newsFlow.eventMark,  // 事件标示
            guid: So.lib.getUnMid(So.comm.md) || So.comm.guid, // 用户唯一标示
            template: '',    //新闻流模板
            currPage: 1,    // 当前数据页数
            newsCount: 10,  // 取数据的条数
            gotoTopDis: 700,    // 返回顶部距离顶部700显示
            retryGetDataTimes: 1,   // 无数据、超时，重新尝试请求数据次数
            showGotoTop: true,    // 是否显示返回顶部
            alwaysShowFlow: false,  // 流常驻，任何情况都不删除流
            onlyShowSingleImg: false,   // 只展示单图新闻
            preventScrollLoad: false,   // 阻止滚动加载，例如：中间流、右侧流
            preferences: {},    // 个性参数
            isShowTag: false,   // 是否展示Tag
            isShowAtlas: true,  // 是否展示图集
            isShowVideo: true,  // 是否展示视频类型
            manyImg: {  // 多图配置
                count: 4,   // >=4为多图
                width: 132, // 图片宽度
                height: 84, // 图片高度
                isShowCorner: true  // 是否展示图片数
            },
            singleImg: {    // 单图配置
                width: 132, // 图片宽度
                height: 84,    // 图片高度
                titleLength: 64 // title字数
            },
            atlasImg: {
                width: 268, // 图片宽度
                height: 170,    // 图片高度
            },
            noImg: {    // 无图
                titleLength: 150 // title字数
            },
            initCb: $.noop,  // 初始化回调
            scrollCb: $.noop,  // 滚动回调
            noDataCb: $.noop,  // 无数据回调
            addNewsCb: $.noop,  // 补充新闻
            removeFlowCb: $.noop,// 关闭流回调
            renderAfterCb: $.noop  // 渲染之后回调
        };
        self.options = $.extend(true, {}, defaultOption, options);
        self.noData = false;    // 数据是否有数据
        self.currRetryGetDataTimes = 0; // 请求重试次数
        self.$flowInner = self.options.$newsFlow.find('ul');    // 插入新闻容器
        self.$loading = $(NewsFlow.Tools.template(self.options.template, { tplType: 'loading' }));    // loading
        self.$gotoTop = $(NewsFlow.Tools.template(self.options.template, { tplType: 'gotoTop' }));    // 返回顶部

        // console.log('%cNewFlow:', 'color:yellow;text-shadow: 1px 1px 0 rgba(0,0,0,1);', self.options);
        // console.log('%cNewFlow.type:', 'color:yellow;text-shadow: 1px 1px 0 rgba(0,0,0,1);', self.options.debugTxt);

        self.init();
    };

    NewsFlow.Tools = {
        getTxt: function (txt) {    // 去掉dom中的html标签
            return So.lib.escapeHTML($('<p>' + txt + '</p>').text());
        },
        cutStr: function (content, len) {   // 带飘红标签b的截断
            content = So.lib.unescapeHTML(So.lib.cutStr(content, len));
            content = content.replace(/^(.*)(<|<b|<\/|<\/b)\.\.\.$/, '$1...')
            var startPos = content.indexOf('<b>');
            var endPos = content.indexOf('</b>');
            if (startPos != endPos) {
                content = content.replace(/(.*)<b>([^<>]*?)\.\.\.$/, '$1<b>$2</b>...');
            }
            return So.lib.escapeHTML(content);
        },
        checkImg: function () { // 图片加载失败，显示背景图
            var img = event.srcElement;
            $(img).remove();
            img.onerror = null;
        },
        formatSeconds: function (seconds) {   // 格式化秒：67s => 01:07
            var time = [
                parseInt(seconds / 60 / 60),
                parseInt(seconds / 60 % 60),
                parseInt(seconds % 60)
            ];
            time[0] === 0 && time.shift();
            return time.join(':').replace(/\b(\d)\b/g, '0$1');
        },
        log: So.lib.log,     // 业务自身打点
        observer: So.lib.observer,  // observer
        template: So.lib.template,  // 模板解析
        isVisible: So.lib.isVisible1,   // dom是否在可视区域内
        getPicUrl: So.lib.getPicUrl,    // 裁图
        formatTime: So.lib.formatTime,  // 时间格式化
        sslReplace: So.lib.sslReplace,  // https协议处理
        escapeHTML: So.lib.escapeHTML,  // 编码
        unescapeHTML: So.lib.unescapeHTML,   // 解码
        localStorage: So.lib.soLocalStorage   // 操作localStorage
    };

    NewsFlow.prototype = {
        Source: {   // 可接多个数据源
            papi: { // 结果页使用的数据
                getData: function (params) {
                    var self = this;
                    var options = self.options;

                    if (self.noData) {
                        return;
                    }

                    params = $.extend({
                        noRender: false,
                        newsCount: options.newsCount,
                        beforeCb: $.noop,
                        afterCb: $.noop,
                        failCb: $.noop
                    }, params);

                    $.ajax({
                        url: '//papi.look.360.cn/mlist',
                        data: {
                            q: options.query,
                            from: options.from,
                            so_type: options.type,
                            n: params.newsCount,
                            u: options.guid,
                            v: 1,
                            sv: 1,
                            net: 5,
                            scene: 1,
                            device: 2,
                            f: 'json_v1',
                            c: 'youlike',
                            callfrom: 'so',
                            data_type: 'jsonp',
                            refer_scene: 'so_7',
                            sign: '360_e39369d1'
                        },
                        type: 'get',
                        timeout: 3000,
                        dataType: 'jsonp',
                        success: function (data) {
                            if (self.noData) {
                                return;
                            }

                            // console.log('%cNewFlow.mlist.length:', 'color:yellow;text-shadow: 1px 1px 0 rgba(0,0,0,1);', data && data.items && data.items.length);
                            if (data && data.items && data.items.length) {
                                params.beforeCb();

                                var formatData = self.Source.papi.formatData.call(self, data.items, data.tc_show);
                                formatData.length && self.render(formatData, params.noRender);

                                options.currPage++;

                                setTimeout(function () {
                                    params.afterCb(self);
                                }, 0);
                            } else {
                                self.setNoData(params);
                                params.failCb(self);
                            }
                        },
                        error: function () {
                            self.setNoData(params);
                            params.failCb(self);
                        }
                    });
                },
                formatData: function (sData, tcShow) {
                    var data = [];
                    var sDataI = {};
                    var options = this.options;

                    for (var i = 0, len = sData.length; i < len; i++) {
                        sDataI = sData[i];

                        if (sDataI.from != 'news' || sDataI.attr.image_url == '' || sDataI.url == '' || sDataI.title == '') {
                            continue;
                        }

                        var type = 'news';
                        var covers = sDataI.attr.image_url ? sDataI.attr.image_url.split(';') : [];
                        // var corner = sDataI.attr.img_num ? sDataI.attr.img_num + '图' : '';
                        var corner = '';

                        // tag
                        var tag = '';
                        if (sDataI.ntag && sDataI.ntag.match(/y3:(.*?);/)) {
                            var tagData = sDataI.ntag.match(/y3:(.*?);/)[1].split(':');
                            tag = tagData[tagData.length - 1];
                        }


                        // 图集
                        // sDataI.s = 'p';
                        if (options.isShowAtlas && sDataI.s == 'p' && covers.length > 1) {
                            type = 'atlas';
                        }

                        // test视频
                        var playcnt = '';
                        ///////
                        // sDataI.s = 'v';
                        // sDataI.duration = 4;
                        // sDataI.playcnt = 10;
                        // covers.length = 1
                        // //////
                        if (options.isShowVideo && (sDataI.s == 'v' || sDataI.s == 'y') && sDataI.duration && covers.length == 1) {
                            type = 'video';
                            corner = NewsFlow.Tools.formatSeconds(sDataI.duration);
                            playcnt = +sDataI.playcnt ? '<span>' + sDataI.playcnt + '次观看</span>' : '';
                        }

                        data.push({
                            type: type,
                            playCount: playcnt,
                            liClass: 'papi',
                            date: sDataI.showtime * 1000,
                            title: sDataI.title,
                            from: sDataI.from,
                            url: sDataI.url,
                            source: sDataI.attr.sitename,
                            covers: covers,
                            corner: corner,
                            attr: '" data-tc-show="' + tcShow + '" data-log-extend="' + sDataI.tc_value + '"',
                            tag: tag
                        });
                    }

                    return data;
                }
            },
            baoDian: {  // 首页使用的数据源
                sid: '',
                timer: null,
                baodianPage: 1,
                batch: {},
                delNewsCookie: 'delNews',
                closeLog: function (self, $li) {
                    var baodian = self.Source.baoDian;
                    var title = $li.find('a[title]').attr('title');
                    var ls = NewsFlow.Tools.localStorage.getItem(baodian.delNewsCookie) || JSON.stringify([]);
                    ls = JSON.parse(ls);
                    if (ls.length == 20) {
                        ls.shift();
                    }
                    ls.push(title);
                    NewsFlow.Tools.localStorage.setItem(baodian.delNewsCookie, JSON.stringify(ls));
                },
                clickLog: function (self, $li) {
                    if (!$li.attr('data-a')) { return; }
                    var options = self.options;
                    var preferences = options.preferences;

                    $.ajax({
                        url: '//papi.look.360.cn/srv/c',
                        data: {
                            uid: options.guid,
                            sqid: preferences.sqid,
                            url: $li.attr('data-callbackUrl'),
                            sign: preferences.sign,
                            stype: 'portal',
                            market: 'so-home',
                            device: 2,
                            net: 5,
                            channel: options.$newsFlow.find('.top-tab a.selected').attr('data-param'),
                            sid: self.sid,
                            a: $li.attr('data-a'),
                            c: $li.attr('data-c'),
                            source: $li.attr('data-src'),
                            s: $li.attr('data-s'),
                            style: 5,
                            act: 'click',
                            refer_scene: 0,
                            refer_subscene: 0,
                            where: 'list',
                            t: parseInt(+new Date() / 1000)
                        },
                        type: 'get',
                        dataType: 'jsonp'
                    });
                },
                showLog: function (self) {    // 曝光打点
                    var baoDian = self.Source.baoDian;
                    var options = self.options;
                    var preferences = options.preferences;
                    clearTimeout(baoDian.timer);
                    baoDian.timer = setTimeout(function () {
                        var log = [];
                        $.each(options.$newsFlow.find('li'), function (i, li) {
                            var $li = $(li);
                            if (NewsFlow.Tools.isVisible(li) && !$li.data('isSend') && $li.attr('data-log')) {
                                log.push($li.attr('data-log'));
                                $li.data('isSend', 1);
                            }
                        });

                        if (!log.length) { return; }

                        $.ajax({
                            url: '//news.qhstatic.com/srv/c2',
                            data: {
                                uid: options.guid,
                                sign: preferences.sign,
                                device: 2,
                                market: 'so-home',
                                func: 'pc_news_realshow',
                                net: 5,
                                stype: 'portal',
                                channel: options.$newsFlow.find('.top-tab a.selected').attr('data-param'),
                                sqid: preferences.sqid,
                                act: 'real_show',
                                refer_scene: 0,
                                refer_subscene: 0,
                                where: 'list',
                                n: log.length,
                                url_pack: '[' + log.toString() + ']'
                            },
                            dataType: 'jsonp',
                            type: 'get',
                        });
                    });
                },
                countBatch: function (self) {
                    var baoDian = self.Source.baoDian;
                    var type = self.options.type;
                    !baoDian.batch[type] && (baoDian.batch[type] = 0);
                    baoDian.batch[type]++;
                },
                getData: function () {
                    var self = this;
                    var baoDian = self.Source.baoDian;
                    var preferences = self.options.preferences;

                    if (preferences.qid !== '') { //登录状态下
                        // 此用户之前取过sqid
                        var localSqid = JSON.parse(NewsFlow.Tools.localStorage.getItem('flow-sqid'));
                        if (localSqid && localSqid.guid && localSqid.guid == preferences.guid) {
                            // console.log('localStorage guid');
                            preferences.sqid = localSqid.val;
                            baoDian.getFlowData(self);
                        } else {
                            // console.log('取guid');
                            baoDian.getSqid(self);
                        }
                    } else {
                        // console.log('未登录');
                        baoDian.getFlowData(self);
                    }
                },
                getSqid: function (self) {
                    var baodian = self.Source.baoDian;
                    var preferences = self.options.preferences;
                    $.ajax({
                        url: '//u.api.look.360.cn/user/sqid',
                        data: {
                            u: preferences.guid,
                            sign: preferences.sign,
                            f: 'jsonp',
                            cq: preferences.Q,
                            ct: preferences.T,
                            device: 2
                        },
                        type: 'get',
                        dataType: 'jsonp',
                        timeout: 1000,
                        success: function (sData) {
                            if (sData && sData.data && sData.data.sqid) {
                                NewsFlow.Tools.localStorage.setItem('flow-sqid', JSON.stringify({ 'val': sData.data.sqid, 'guid': preferences.guid }));
                                self.sqid = sData.data.sqid;
                                baodian.getFlowData(self);
                            } else {
                                baodian.getFlowData(self);
                            }
                        },
                        error: function () {
                            baodian.getFlowData(self);
                        }
                    });
                },
                getFlowData: function (self) {
                    var options = self.options;
                    var baodian = self.Source.baoDian;
                    var preferences = self.options.preferences;

                    $.ajax({
                        url: '//papi.look.360.cn/mlist',
                        data: {
                            u: options.guid,
                            n: 10,
                            sign: preferences.sign,
                            c: options.type,
                            f: 'jsonp',
                            device: 2,
                            sv: 1,
                            net: 5,
                            v: 1,
                            sqid: preferences.sqid,
                            action: baodian.baodianPage == 1 ? 1 : 2
                        },
                        type: 'get',
                        dataType: 'jsonp',
                        success: function (sData) {
                            // 模拟置顶 视频
                            // sData = ({ "data": { "host": "merger296", "out_screen_info": "", "platfrom_func": "", "res": [{ "a": "t", "attr": [{ "color": "ff7070", "content": "置顶", "direct": "1|newhot", "isclick": "1", "isdisplay": "1", "name": "hot", "pos": "2" }], "c": "domestic", "cai_num": "0", "cicon": "http://p0.qhimg.com/t01c7a467f7262aadda.png", "city_label": "local_NeiMengGu_NeiMengGu", "cmt_num": "0", "display": { "cicon": "0", "cmt": "0", "from": "1", "fromicon": "0", "time": "1" }, "ext_src": "{\"is_hot\": \"1\"}", "f": "", "fast": "1", "filter": "内蒙古自治区|宁夏回族自治区", "fkws": "中年|老年||党委|内蒙古|职务|宁夏自治区|同志|调整", "fromicon": "", "fword": "", "gnid": "9572917831f4e0bb6", "h": "0", "i": "https://p.ssl.qhimg.com/dm/660_370_/t01a1d9cdfebfd9d1f8.jpg", "idx": "1", "in": "", "index": "1", "j": "国内;调整|同志|党委|职务|内蒙古|宁夏自治区", "m": "d09306645f183ad3e0b14e327a66172eedd08d4", "nlabel": "stat_:fawen.news.so.com:5paw5Y2O56S+", "ntag": "kloc_NeiMengGu;kloc_NeiMengGu:tdomestic;y3:国内:时政:人事变动;cdomestic_P:国内:干部:班子成员;tagid:;mk500_487;tdomestic;cdomestic_P:国内:政法委:机关党委;cdomestic_S:5:a40003:新疆新闻;mk1332_109;sdomestic_国内;yt3:国内:时政:人事变动;cdomestic_S:5:7406:党委常委:地委;yt2:国内:时政;y1:国内;cdomestic_P:国内:主持:书记;y2:国内:时政;cdomestic_P:国内:刘有明:李新元;kdomestic_1:内蒙古;cdomestic_P:国内:县委书记:县委组织部;yt1:国内;mk1332_43;cdomestic_P:国内:省委书记:省长", "p": "1571993044", "pcurl": "https://www.360kuai.com/9572917831f4e0bb6?refer_scene=\u0026scene=\u0026sign=360_fc624efc\u0026tj_url=9572917831f4e0bb6\u0026uid=bcbe314c662be3897829aff89343c26d", "ptid": "a7174|a7281|a7024|a7691|a7911|a7610", "pv": "0", "r": "c527f2df20efe308", "rawurl": "http://fawen.news.so.com/d3070e9caf3f95b09a269b86059f542b", "recalltype": "op_data", "refer": "", "rot": "0", "rpt": "c527f2df20efe308", "s": "t", "sex_score": "0", "showtime": "1571999478", "source": "dfs_putfast,domestic,fts3,hotfull,mass_porn,qt:levelL,socialc,sts0,rtype_hot,thot_base,uusdkother_0,nbbh_merger296.se.zzzc,uusdkother,,wspuser_3beijing,nbbe_a1616,nbbe_rankk1490,,nbbg_9572917831f4e0bb6,nbbtm_1571999478,nbbs_0:1", "stag": "国内", "style": "1", "t": "内蒙古宁夏自治区党委主要负责同志职务调整", "type": "hot", "u": "https://www.360kuai.com/mob/transcoding?url=http%3A%2F%2Ffawen.news.so.com%2Fd3070e9caf3f95b09a269b86059f542b\u0026check=1e68ae2bef747219\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360%5Ffc624efc\u0026v=1\u0026sv=8\u0026templetctl=7\u0026360newsdetail=1\u0026hsitetype=1\u0026ucheck=316737eabf748634166a15b794d9329b\u0026hscmt=1\u0026pure=1", "ucheck": "316737eabf748634166a15b794d9329b", "x": "0", "zan_num": "0" }, { "a": "g", "attr": [{ "color": "ff7070", "content": "置顶", "direct": "1|newhot", "isclick": "1", "isdisplay": "1", "name": "hot", "pos": "2" }], "c": "social", "cai_num": "0", "cicon": "http://p0.qhimg.com/t01701fe329261eefc0.png", "city_label": "", "cmt_num": "15", "display": { "cicon": "0", "cmt": "1", "from": "1", "fromicon": "0", "time": "1" }, "ext_src": "{\"is_hot\": \"1\"}", "f": "", "fast": "1", "filter": "", "fkws": "中年|老年||英方|遇难者|国籍|中国|确认|华春莹", "fromicon": "", "fword": "", "gnid": "924c9b277947501a1", "h": "0", "i": "https://p.ssl.qhimg.com/dmfd/182_136_/t01b33ab45ac9d450a.png|https://p.ssl.qhimg.com/dmfd/182_136_/t01f9eb9892.png|https://p.ssl.qhimg.com/dmfd/182_136_/t0128258a2b563a1946.jpg|https://p.ssl.qhimg.com/dmfd/182_136_/t0120e325c5c84b84e8.jpg", "idx": "2", "in": "", "index": "2", "j": "社会;中国|华春莹|遇难者|英方|国籍|确认", "m": "807f48421e185fedacd72fbf9800a09a50d0fba9", "mcmt_num": "0", "nlabel": "stat_:fawen.news.so.com:546v55CD572R", "ntag": "cinternational_S:5:a39669:特朗普:萨德;mk500_142;y4:国际:国际社会:社会要闻:涉中国;csocial_P:全类:使馆:大使馆;tagid:;call_P:全类:使馆:大使馆;yt2:国际:国际社会;mk1332_23;yt1:国际;yt3:国际:国际社会:社会要闻;tsocial;y1:国际;ssocial_社会;y3:国际:国际社会:社会要闻;cinternational_S:5:11256:中方:外交部回应;yt4:国际:国际社会:社会要闻:空难;cinternational_S:5:m35660:杜特尔特:外交部;y2:国际:国际社会", "p": "1571988616", "pcurl": "https://www.360kuai.com/924c9b277947501a1?refer_scene=\u0026scene=\u0026sign=360_fc624efc\u0026tj_url=924c9b277947501a1\u0026uid=bcbe314c662be3897829aff89343c26d", "ptid": "a8303|a429", "pv": "0", "r": "4621ef8a0b325c0e", "rawurl": "http://fawen.news.so.com/b91d3cee3cd4f3618cde071c1fd82956", "recalltype": "op_data", "refer": "", "rot": "0", "rpt": "4621ef8a0b325c0e", "s": "t", "sex_score": "0", "showtime": "1571999478", "source": "dfs_putfast,fts1,hotfull,op50_st,piece_time,qt:levelH,social,sts0,rtype_hot,thot_base,uusdkother_0,nbbh_merger296.se.zzzc,uusdkother,,wspuser_3beijing,nbbe_a1616,nbbe_rankk1490,,nbbg_924c9b277947501a1,nbbtm_1571999478,nbbs_0:2", "stag": "社会", "t": "华春莹：英方目前仍无法确认遇难者是否中国国籍", "type": "hot", "u": "https://www.360kuai.com/mob/transcoding?url=http%3A%2F%2Ffawen.news.so.com%2Fb91d3cee3cd4f3618cde071c1fd82956\u0026check=399ea08d106aa037\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360%5Ffc624efc\u0026v=1\u0026sv=8\u0026templetctl=7\u0026360newsdetail=1\u0026hsitetype=1\u0026ucheck=d56e17ba4bd2fca10fd4780b19d16e0b\u0026hscmt=1", "ucheck": "d56e17ba4bd2fca10fd4780b19d16e0b", "x": "0", "zan_num": "0" }, { "a": "h", "c": "youlike,fun,,", "exData": "eyJhIjoiaCIsImMiOiJ5b3VsaWtlLGZ1biwsIiwiZGF0YSI6W3siYSI6ImgiLCJhdHRyIjpbeyJjb2xvciI6ImZmNzA3MCIsImNvbnRlbnQiOiLkuJPpopgiLCJkaXJlY3QiOiIzfCIsImlzY2xpY2siOiIwIiwiaXNkaXNwbGF5IjoiMCIsIm5hbWUiOiJ6aHVhbnRpIiwicG9zIjoiMiJ9XSwiYmlnaSI6IiIsImMiOiJmdW4iLCJkaXNwbGF5Ijp7ImZyb20iOiIxIiwiZnJvbWljb24iOiIwIiwidGltZSI6IjEifSwiZiI6Iua1t+Wklue9kSIsImkiOiJodHRwczovL3Auc3NsLnFoaW1nLmNvbS90MDFlNmFhNTViOTBjNzBmM2U0LmpwZyIsInBjdXJsIjoiaHR0cDovL2xvb2suMzYwLmNuL2RldGFpbD91cmw9aHR0cCUzQSUyRiUyRmZhd2VuLm5ld3Muc28uY29tJTJGNjMyZDVkNTllOGM3ZGFhOGY4M2Q1OTM1ODBiYWRiYzZcdTAwMjZjaGVjaz0xYmEwYWVmYjU1Mzk3NjNiXHUwMDI2aHNpdGV0eXBlPTFcdTAwMjZoc2NtdD0xXHUwMDI2dWlkPWJjYmUzMTRjNjYyYmUzODk3ODI5YWZmODkzNDNjMjZkXHUwMDI2c2lnbj0zNjAlNUZmYzYyNGVmYyIsInBpY19zIjoiYSIsInIiOiJkOTRlZmUzNDZlY2UxOWZmIiwicmF3dXJsIjoiaHR0cDovL2Zhd2VuLm5ld3Muc28uY29tLzYzMmQ1ZDU5ZThjN2RhYThmODNkNTkzNTgwYmFkYmM2IiwicnB0IjoiYjIyOGY0ODJlNjZjOWMxOSIsInMiOiJ0Iiwic2hvd3RpbWUiOiIxNTcxOTk5NDc4IiwidCI6IumfqeWbveitpuaWueWwhuWvuembquiOiei/m+ihjOWwuOajgCDlubbosIPmn6XlhbbmmK/lkKbmgqPmipHpg4Hnl4ciLCJ1IjoiaHR0cDovL20ubmV3cy5zby5jb20vdHJhbnNjb2Rpbmc/dXJsPWh0dHAlM0ElMkYlMkZmYXdlbi5uZXdzLnNvLmNvbSUyRjYzMmQ1ZDU5ZThjN2RhYThmODNkNTkzNTgwYmFkYmM2XHUwMDI2Y2hlY2s9MWJhMGFlZmI1NTM5NzYzYlx1MDAyNmhzaXRldHlwZT0xXHUwMDI2aHNjbXQ9MVx1MDAyNnVpZD1iY2JlMzE0YzY2MmJlMzg5NzgyOWFmZjg5MzQzYzI2ZFx1MDAyNnNpZ249MzYwJTVGZmM2MjRlZmNcdTAwMjZ2PTFcdTAwMjZzdj04XHUwMDI2MzYwbmV3c2RldGFpbD0xIn1dLCJleHRyYV9saW5rIjoiaHR0cDovL3d3dy4zNjBrdWFpLmNvbS9tb2Ivc3ViamVjdC8zODI/c2lkPTJjOGUwNDM3N2I2NzliMWM4MjIyYzE5MTIzOWIxZjk4XHUwMDI2dmVyc2lvbj1cdTAwMjZ1aWQ9YmNiZTMxNGM2NjJiZTM4OTc4MjlhZmY4OTM0M2MyNmRcdTAwMjZzaWduPTM2MF9mYzYyNGVmY1x1MDAyNmNoYW5uZWw9eW91bGlrZSIsImV4dHJhX3RpcCI6IiIsImlkIjoiMzgyIiwianVtcF9jaGFubmVsIjoiIiwibmFtZSI6IumbquiOieehruiupOatu+S6oSIsInBvc2l0aW9uIjoiMyIsInMiOiJ6aHVhbnRpIiwic291cmNlIjoieW91bGlrZV96aHVhbnRpX2NhcmRfMzgyLHJ0eXBlX29wX2RhdGEiLCJ1IjoiaHR0cDovL3d3dy4zNjBrdWFpLmNvbS9tb2Ivc3ViamVjdC8zODI/c2lkPTJjOGUwNDM3N2I2NzliMWM4MjIyYzE5MTIzOWIxZjk4XHUwMDI2dmVyc2lvbj1cdTAwMjZ1aWQ9YmNiZTMxNGM2NjJiZTM4OTc4MjlhZmY4OTM0M2MyNmRcdTAwMjZzaWduPTM2MF9mYzYyNGVmY1x1MDAyNmNoYW5uZWw9eW91bGlrZSJ9", "f": "", "fromicon": "", "r": "382", "recalltype": "op_data", "s": "zhuanti", "showtime": "0", "source": "youlike_zhuanti_card_382,rtype_op_data", "srcid": "382", "t": "雪莉确认死亡", "u": "http://www.360kuai.com/mob/subject/382?sid=2c8e04377b679b1c8222c191239b1f98\u0026version=\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360_fc624efc\u0026channel=youlike" }, { "a": "h", "attr": [{ "name": "video", "pos": 2 }], "c": "other", "cai_num": "0", "cicon": "http://p0.qhimg.com/t013d2d49fd93dda4c3.png", "city_label": "", "cmt_num": "0", "content": "可爱的Anna：爬到桥上面，用一颗手雷就灭队", "debug_cmt_num": "-", "description": "", "display": { "cicon": "0", "cmt": "0", "from": "1", "fromicon": "0", "time": "1", "y2h5": "1" }, "duration": "1", "exData": "eyJjb2RlIjoiOTU0MmUwM2Y4MjQ0OWJjMjUiLCJwaWNVcmwiOiJodHRwczovL3Auc3NsLnFoaW1nLmNvbS90MDE1YWUxZmIyNGY1YzJjMzg0LmpwZz9zaXplPTg1Mng0ODAiLCJwbGF5Q250IjoiMCIsInBsYXlMaW5rIjoiaHR0cDovL2FwaS5sb29rLjM2MC5jbi92aWRlby9kZXRhaWw/aWQ9OTU0MmUwM2Y4MjQ0OWJjMjVcdTAwMjZzaWduPTM2MF9mYzYyNGVmY1x1MDAyNnVpZD1iY2JlMzE0YzY2MmJlMzg5NzgyOWFmZjg5MzQzYzI2ZFx1MDAyNmM9eW91bGlrZVx1MDAyNnVjaGVjaz05MjJkNzczNWZjM2Y5ZTEwMzFmNDM4OGQ4YjRmM2JlZFx1MDAyNnNka195b3VsaWtlX3R2PTFcdTAwMjZpc19uZXdfcmVjb209MSIsInRvdGFsVGltZVN0ciI6IjAyOjMzIn0=", "f": "", "filter": "", "fkws": "手雷|", "fromicon": "", "fword": "", "gnid": "9542e03f82449bc25", "gzhid": "268761040", "h": "0", "h5url": "", "i": "https://p.ssl.qhimg.com/video/360_202_/t015ae1fb24f5c2c384.jpg?size=852x480", "idx": "1", "in": "", "j": "其他;手雷|anna", "m": "5adbbcc323da6a995d56afe6ee617ddd0515be8", "nlabel": "stat_268761040:video.news.so.com:6aOO6KGM6KeG6aKR,pageType_zmt:video", "ntag": "y2:动物:野生动物;mk500_182;y1:动物;mk1332_51;call_P:全类:时装设计师:服装设计师;tother;sother_其他;tagid:;yt2:动物:野生动物;mk1332_713;yt1:动物", "opstate": "0,66", "p": "1571274126", "pcurl": "https://www.360kuai.com/9542e03f82449bc25?refer_scene=\u0026scene=\u0026sign=360_fc624efc\u0026tj_url=9542e03f82449bc25\u0026uid=bcbe314c662be3897829aff89343c26d", "playType": 0, "playcnt": "0", "postfix": "", "ptid": "a435|a438|a8499", "pv": "0", "r": "7ed75bf37522cf10", "rawurl": "http://video.news.so.com/00efa1c8a657571c24cffda484db440e", "recalltag": "NULL__0__0", "recalltype": "qtest", "refer": "", "relateUrl": "http://m.look.360.cn/relate?sign=360_fc624efc\u0026wid=bcbe314c662be3897829aff89343c26d\u0026url=http%3A%2F%2Fvideo%2Enews%2Eso%2Ecom%2F00efa1c8a657571c24cffda484db440e\u0026refer=list\u0026rel_pos=0\u0026ser=0\u0026a_id=video_detail\u0026b_id=0", "rot": "0", "rpt": "73f2371d7f0c9f71", "rptid": "5adbbcc323da6a995d56afe6ee617ddd0515be8", "s": "y", "sex_score": "0", "showtime": "1571999478", "source": "qt:levelL,otherc,sts0,other,fts0,art_src_1,nbbrs_1619_1,nbbr_NULL__0__0,nbbc_NULL,rtype_qtest,nbbp_qtest,from_c,nbby_AWJlZ2luX3RpbWUCNzI=,nbbrext_qrecall:,qtest,uusdkother_0,nbbh_merger296.se.zzzc,uusdkother,,wspuser_3beijing,nbbe_a1616,nbbe_rankk1490,,nbbg_9542e03f82449bc25,nbbu_q111:,nbbtm_1571999478,nbbs_0:4", "stag": "其他", "t": "可爱的Anna：爬到桥上面，用一颗手雷就灭队", "type": "newgood", "u": "https://www.360kuai.com/mob/transcoding?url=http%3A%2F%2Fvideo.news.so.com%2F00efa1c8a657571c24cffda484db440e\u0026check=b36cb9d1b063767b\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360%5Ffc624efc\u0026v=1\u0026sv=8\u0026templetctl=7\u0026360newsdetail=1\u0026articlety=zmt\u0026hsitetype=1\u0026ucheck=922d7735fc3f9e1031f4388d8b4f3bed\u0026hscmt=1", "ucheck": "922d7735fc3f9e1031f4388d8b4f3bed", "vid": "", "videoUrl": "http://api.look.360.cn/video/detail?id=9542e03f82449bc25\u0026sign=360_fc624efc\u0026uid=bcbe314c662be3897829aff89343c26d\u0026c=youlike\u0026ucheck=922d7735fc3f9e1031f4388d8b4f3bed\u0026sdk_youlike_tv=1\u0026is_new_recom=1", "x": "0", "zan_num": "0", "zmid": "sq_268761040", "zmt": { "id": "268761040", "name": "风行视频", "pic": "https://p.ssl.qhimg.com/dmfd/128_128_80/t010d44a5c30eace11d.png", "textimg": "https://p.ssl.qhimg.com/bl/0_3/video/360_202_/t015ae1fb24f5c2c384.jpg?size=852x480" } }, { "a": "h", "abst": "A.J.普莱斯曾效力于CBA的上海及山东等球队，在此期间场均得分在30分左右", "c": "sport", "cai_num": "0", "cicon": "http://p0.qhimg.com/t01490a227ef6061360.png", "city_label": "", "cmt_num": "0", "display": { "cicon": "0", "cmt": "0", "from": "1", "fromicon": "0", "time": "1" }, "f": "", "filter": "cba", "fkws": "nba|青年|中年||单场|cba|外援|aj|得分|普莱斯", "fromicon": "", "fword": "", "gnid": "9573ce5a5b82106ea", "gzhid": "3151589035", "h": "0", "i": "https://p.ssl.qhimg.com/dmfd/182_136_/t012a755e8bf1c94e88.jpg?size=640x426|https://p.ssl.qhimg.com/dmfd/182_136_/t01658c3f9a85d31508.jpg?size=640x959|https://p.ssl.qhimg.com/dmfd/182_136_/t01e80d4e09a84a42fe.jpg?size=640x426|https://p.ssl.qhimg.com/dmfd/182_136_/t01cad4995126b2a010.jpg?size=640x426", "idx": "6", "in": "", "j": "体育;外援|cba|单场|aj|普莱斯|得分", "m": "7fa9d99c1ba6849dab90197dca3454a73d018bf", "nlabel": "hquality_0,bdselect_0,okclassify_mannul,invite_1,stat_3151589035:zm.news.so.com:5L2T5Z2b6YCf6YCS,pageType_zmt:purephv,glevel_3", "ntag": "csport_S:5:m36417:cba:姚明;y2:体育:篮球;csport_S:5:a37654:周琦:cba;yt1:体育;ksport_1:cba;yt3:体育:篮球:中国篮球;y1:体育;ksport_1:普莱斯;y3:体育:篮球:中国篮球;mk1332_31;tagid:;csport_S:5:5965:cba:外援;csport_P:全类:八一队:刘炜;call_P:全类:八一队:刘炜;yt2:体育:篮球;csport_P:体育:八一队:刘炜;ssport_nba;mk500_106;tsport", "opstate": "0,66", "p": "1571200432", "pcurl": "https://www.360kuai.com/9573ce5a5b82106ea?refer_scene=\u0026scene=\u0026sign=360_fc624efc\u0026tj_url=9573ce5a5b82106ea\u0026uid=bcbe314c662be3897829aff89343c26d", "plist": "https://p.ssl.qhimg.com/t012a755e8bf1c94e88.jpg?size=640x426|https://p.ssl.qhimg.com/t01658c3f9a85d31508.jpg?size=640x959|https://p.ssl.qhimg.com/t01e80d4e09a84a42fe.jpg?size=640x426|https://p.ssl.qhimg.com/t01cad4995126b2a010.jpg?size=640x426|https://p.ssl.qhimg.com/t015eb567bc70f1c0bc.jpg?size=640x426|https://p.ssl.qhimg.com/t01f134a1ed15950b89.jpg?size=640x962", "pnum": "6", "ptid": "a966|a3354", "pv": "0", "r": "1b58beae16e8c585", "rawurl": "http://m.news.so.com/transcoding?ctype=gallery\u0026url=http%3A%2F%2Fzm.news.so.com%2F04d23e5a59d94820384ea8794881b786\u0026check=c43113da45b65a3b", "recalltag": "NULL__0__0", "recalltype": "qtest", "refer": "", "rot": "0", "rpt": "1b58beae16e8c585", "s": "t", "sex_score": "0", "showtime": "1571999478", "source": "qt:levelL,piece_time,sts0,fts3,art_src_0,sport,dfs_zimeiti,nbbrs_926_6,nbbr_NULL__0__0,nbbc_NULL,rtype_qtest,nbbp_qtest,from_c,nbby_AWJlZ2luX3RpbWUCNzI=,nbbrext_qrecall:,qtest,uusdkother_0,nbbh_merger296.se.zzzc,uusdkother,,wspuser_3beijing,nbbe_a1616,nbbe_rankk1490,,nbbg_9573ce5a5b82106ea,nbbu_q111:,nbbtm_1571999478,nbbs_0:5", "stag": "体育|nba", "t": "单场狂砍57分！AJ普莱斯的得分能力在CBA小外援当中是什么级别？", "type": "newgood", "u": "https://www.360kuai.com/mob/transcoding?ctype=gallery\u0026url=http%3A%2F%2Fzm.news.so.com%2F04d23e5a59d94820384ea8794881b786\u0026check=c43113da45b65a3b\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360%5Ffc624efc\u0026v=1\u0026sv=8\u0026hsitetype=1\u0026ucheck=c4cdd8e1734a25bfc9641841ccb13d3a\u0026hscmt=1", "ucheck": "c4cdd8e1734a25bfc9641841ccb13d3a", "x": "0", "zan_num": "0", "zmid": "sq_3151589035", "zmt": { "id": "3151589035", "name": "体坛速递", "pic": "https://p.ssl.qhimg.com/dmfd/128_128_80/t01e00672cddef9d14a.jpg", "textimg": "https://p.ssl.qhimg.com/bl/0_3/t01658c3f9a85d31508.jpg?size=640x959" } }, { "a": "h", "attr": [{ "name": "video", "pos": 2 }], "c": "social", "cai_num": "0", "cicon": "http://p0.qhimg.com/t01701fe329261eefc0.png", "city_label": "", "cmt_num": "0", "content": "越南发现“地下城”，入口处不到一米，底下却是一个“繁荣市区”", "debug_cmt_num": "-", "description": "", "display": { "cicon": "0", "cmt": "0", "from": "1", "fromicon": "0", "time": "1", "y2h5": "1" }, "duration": "2", "exData": "eyJjb2RlIjoiOTU3YTU4OTQxOGVlZTE3NzkiLCJwaWNVcmwiOiJodHRwczovL3Auc3NsLnFoaW1nLmNvbS90MDEwYzI3OWNmM2IyODQwMWE5LmpwZyIsInBsYXlDbnQiOiIwIiwicGxheUxpbmsiOiJodHRwOi8vYXBpLmxvb2suMzYwLmNuL3ZpZGVvL2RldGFpbD9pZD05NTdhNTg5NDE4ZWVlMTc3OVx1MDAyNnNpZ249MzYwX2ZjNjI0ZWZjXHUwMDI2dWlkPWJjYmUzMTRjNjYyYmUzODk3ODI5YWZmODkzNDNjMjZkXHUwMDI2Yz15b3VsaWtlXHUwMDI2dWNoZWNrPTI1NjA0ZjZkOWE4YzBiM2ExOTJjOGEzMzgzZGZhMzFmXHUwMDI2c2RrX3lvdWxpa2VfdHY9MVx1MDAyNmlzX25ld19yZWNvbT0xIiwidG90YWxUaW1lU3RyIjoiMDE6NTgifQ==", "f": "", "filter": "", "fkws": "青年|低薪||入口处|底下|越南|市区|发现|地下城", "fromicon": "", "fword": "", "gnid": "957a589418eee1779", "gzhid": "3028079675", "h": "0", "h5url": "", "i": "https://p.ssl.qhimg.com/video/360_202_/t010c279cf3b28401a9.jpg", "idx": "2", "in": "", "j": "社会;发现|入口处|市区|地下城|底下|越南", "m": "30c99d31da2b91a71fcd20799cc1474d27a03161", "nlabel": "stat_3028079675:video.news.so.com:54iG57Gz6Iqx6KeG6aKR,pageType_zmt:video", "ntag": "mk1332_14;mk500_427;csocial_P:全类:副本:打boss;mk1332_53;y1:国内;ksocial_1:越南;yt2:国内:城市介绍;y2:国内:城市介绍;tagid:;tsocial;call_P:全类:副本:打boss;yt1:国内;ssocial_社会", "opstate": "0,66", "p": "1571270522", "pcurl": "https://www.360kuai.com/957a589418eee1779?refer_scene=\u0026scene=\u0026sign=360_fc624efc\u0026tj_url=957a589418eee1779\u0026uid=bcbe314c662be3897829aff89343c26d", "playType": 0, "playcnt": "0", "postfix": "", "ptid": "a401", "pv": "0", "r": "7b143d09af2fc1d0", "rawurl": "http://video.news.so.com/0215aea6db15c03ff71629b128c68332", "recalltag": "NULL__0__0", "recalltype": "qtest", "refer": "", "relateUrl": "http://m.look.360.cn/relate?sign=360_fc624efc\u0026wid=bcbe314c662be3897829aff89343c26d\u0026url=http%3A%2F%2Fvideo%2Enews%2Eso%2Ecom%2F0215aea6db15c03ff71629b128c68332\u0026refer=list\u0026rel_pos=0\u0026ser=0\u0026a_id=video_detail\u0026b_id=0", "rot": "0", "rpt": "ca0437d3f0f62f70", "rptid": "30c99d31da2b91a71fcd20799cc1474d27a03161", "s": "y", "sex_score": "0", "showtime": "1571999478", "source": "qt:levelL,sts0,fts3,social,art_src_1,op50_st,nbbrs_1364_2,nbbr_NULL__0__0,nbbc_NULL,rtype_qtest,nbbp_qtest,from_c,nbby_AWJlZ2luX3RpbWUCNzI=,nbbrext_qrecall:,qtest,uusdkother_0,nbbh_merger296.se.zzzc,uusdkother,,wspuser_3beijing,nbbe_a1616,nbbe_rankk1490,,nbbg_957a589418eee1779,nbbu_q111:,nbbtm_1571999478,nbbs_0:6", "stag": "社会", "t": "越南发现“地下城”，入口处不到一米，底下却是一个“繁荣市区”", "type": "newgood", "u": "https://www.360kuai.com/mob/transcoding?url=http%3A%2F%2Fvideo.news.so.com%2F0215aea6db15c03ff71629b128c68332\u0026check=f19b1d18fb119c61\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360%5Ffc624efc\u0026v=1\u0026sv=8\u0026templetctl=7\u0026360newsdetail=1\u0026articlety=zmt\u0026hsitetype=1\u0026ucheck=25604f6d9a8c0b3a192c8a3383dfa31f\u0026hscmt=1", "ucheck": "25604f6d9a8c0b3a192c8a3383dfa31f", "vid": "", "videoUrl": "http://api.look.360.cn/video/detail?id=957a589418eee1779\u0026sign=360_fc624efc\u0026uid=bcbe314c662be3897829aff89343c26d\u0026c=youlike\u0026ucheck=25604f6d9a8c0b3a192c8a3383dfa31f\u0026sdk_youlike_tv=1\u0026is_new_recom=1", "x": "0", "zan_num": "0", "zmid": "sq_3028079675", "zmt": { "id": "3028079675", "name": "爆米花视频", "pic": "https://p.ssl.qhimg.com/dmfd/128_128_80/t0143d9513a4bfc66f7.png", "textimg": "https://p.ssl.qhimg.com/bl/0_3/video/360_202_/t010c279cf3b28401a9.jpg" } }, { "a": "h", "c": "fun", "cai_num": "0", "cicon": "http://p0.qhimg.com/t0173a44ffe5396e08a.png", "city_label": "", "cmt_num": "0", "display": { "cicon": "0", "cmt": "0", "from": "1", "fromicon": "0", "time": "1" }, "f": "", "filter": "古力娜扎|双子杀手|王雷", "fkws": "电影|青年|中年||票房|明星|助阵|上座率|王雷|可惜", "fromicon": "", "fword": "", "gnid": "9dbae032cefb012ae", "gzhid": "2685384714", "h": "0", "i": "https://p0.ssl.qhimgs4.com/dmfd/182_136_/t01de9989aac3f21764.jpg?size=500x889|https://p0.ssl.qhimgs4.com/dmfd/182_136_/t01060922aa34482711.jpg?size=500x679|https://p0.ssl.qhimgs4.com/dmfd/182_136_/t01e5024a3202186cc7.jpg?size=500x333|https://p0.ssl.qhimgs4.com/dmfd/182_136_/t018e8ff5c6007ea8a0.jpg?size=500x315", "idx": "3", "in": "", "j": "娱乐;上座率|助阵|明星|王雷|可惜|票房", "m": "4bd043a97614f7cbb834f13fdc35b839cd9d5b40", "nlabel": "stat_2685384714:zm.news.so.com:6L+95Ymn5bCP5YiG6Zif,pageType_zmt,glevel_3", "ntag": "yt3:娱乐:明星:外国明星;cfun_P:娱乐:《极限特工3》:《极限特工》;sfun_电影;mk1332_177;kfun_1:票房;cfun_S:5:14974:票房:上映;y2:娱乐:明星;cfun_P:娱乐:《乘风破浪》:《西游伏妖篇》;tfun;yt1:娱乐;cfun_S:5:a39399:票房:《战狼2》;y1:娱乐;y3:娱乐:明星:华语明星;cfun_P:全类:国产电影:票房;call_P:全类:国产电影:票房;call_P:全类:《寻龙诀》:《爵迹》;kfun_1:明星;cfun_S:5:m24894:票房:电影票房;yt2:娱乐:明星;tagid:;cfun_P:全类:《寻龙诀》:《爵迹》;mk1332_182;mk500_445", "opstate": "0,66", "p": "1571965488", "pcurl": "https://www.360kuai.com/9dbae032cefb012ae?refer_scene=\u0026scene=\u0026sign=360_fc624efc\u0026tj_url=9dbae032cefb012ae\u0026uid=bcbe314c662be3897829aff89343c26d", "ptid": "a4769|a988|a4711|a271", "pv": "11", "r": "76df730e05004f33", "rawurl": "http://zm.news.so.com/1060d45c3e350c3f997e73f1f862763c", "recalltag": "NULL__0__0", "recalltype": "qtest", "refer": "", "rot": "0", "rpt": "76df730e05004f33", "s": "t", "sex_score": "1", "showtime": "1571999478", "source": "piece_time,sexamb,sts3,fts3,fun,art_src_1,qt:levelH|qt:colorful,op50_st,nbbrs_1302_3,nbbr_NULL__0__0,nbbc_NULL,rtype_qtest,nbbp_qtest,from_c,nbby_AWJlZ2luX3RpbWUCOA==,nbbrext_qrecall:,qtest,uusdkother_0,nbbh_merger296.se.zzzc,uusdkother,,wspuser_3beijing,nbbe_a1616,nbbe_rankk1490,,nbbg_9dbae032cefb012ae,nbbu_q111:,nbbtm_1571999478,nbbs_0:7", "stag": "娱乐|电影", "t": "首日票房仅49.65万，上座率才1.8％，可惜了45位明星的助阵", "type": "newgood", "u": "https://www.360kuai.com/mob/transcoding?url=http%3A%2F%2Fzm.news.so.com%2F1060d45c3e350c3f997e73f1f862763c\u0026check=553c575377a05d24\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360%5Ffc624efc\u0026v=1\u0026sv=8\u0026templetctl=7\u0026360newsdetail=1\u0026articlety=zmt\u0026hsitetype=1\u0026ucheck=67224087f4714e19283cb5af64aed6c8\u0026hscmt=1", "ucheck": "67224087f4714e19283cb5af64aed6c8", "x": "0", "zan_num": "0", "zmid": "sq_2685384714", "zmt": { "id": "2685384714", "name": "追剧小分队", "pic": "https://p.ssl.qhimg.com/dmfd/128_128_80/t014e53ec724ff46230.jpg", "textimg": "https://p0.ssl.qhimgs4.com/bl/0_3/t01060922aa34482711.jpg?size=500x679" } }, { "a": "h", "attr": [{ "name": "video", "pos": 2 }], "c": "game", "cai_num": "0", "cicon": "http://p0.qhimg.com/t01f4d3862df6f9e438.png", "city_label": "", "cmt_num": "0", "content": "我的世界联机第七季29：去星哥家借甘蔗，做出装备强化台", "debug_cmt_num": "-", "description": "", "display": { "cicon": "0", "cmt": "0", "from": "1", "fromicon": "0", "time": "1", "y2h5": "1" }, "duration": "3", "exData": "eyJjb2RlIjoiOTA4N2Y0MjFhNTQyMzE3N2QiLCJwaWNVcmwiOiJodHRwczovL3Auc3NsLnFoaW1nLmNvbS90MDE3YmM5MzllOTIyYTE0MWI4LmpwZz9zaXplPTE5MjB4MTA4MCIsInBsYXlDbnQiOiIxMDYiLCJwbGF5TGluayI6Imh0dHA6Ly9hcGkubG9vay4zNjAuY24vdmlkZW8vZGV0YWlsP2lkPTkwODdmNDIxYTU0MjMxNzdkXHUwMDI2c2lnbj0zNjBfZmM2MjRlZmNcdTAwMjZ1aWQ9YmNiZTMxNGM2NjJiZTM4OTc4MjlhZmY4OTM0M2MyNmRcdTAwMjZjPXlvdWxpa2VcdTAwMjZ1Y2hlY2s9MzYyZTIwMzQ3MDc1MzFlMmUyOWVhNTU4ODA5MDVhMmRcdTAwMjZzZGtfeW91bGlrZV90dj0xXHUwMDI2aXNfbmV3X3JlY29tPTEiLCJ0b3RhbFRpbWVTdHIiOiIwNToyOSJ9", "f": "", "filter": "", "fkws": "星哥|甘蔗|装备||联机|强化", "fromicon": "", "fword": "", "gnid": "9087f421a5423177d", "gzhid": "268761040", "h": "0", "h5url": "", "i": "https://p.ssl.qhimg.com/video/360_202_/t017bc939e922a141b8.jpg?size=1920x1080", "idx": "4", "in": "", "j": "游戏;星哥|我的世界|强化|甘蔗|装备|联机", "m": "9c5125647d8f779587180959b3823c443a347f0d", "nlabel": "stat_268761040:video.news.so.com:6aOO6KGM6KeG6aKR,pageType_zmt:video", "ntag": "mk1332_120;yt3:游戏:游戏资讯:我的世界;cgame_S:5:15213:我的世界:服务器;mk1332_149;kgame_1:我的世界;y3:游戏:游戏资讯:我的世界;mk500_281;tagid:;yt2:游戏:游戏资讯;cgame_S:5:m36143:我的世界:解说;cgame_S:5:a39664:攻略:手游;y1:游戏;tgame;y2:游戏:游戏资讯;sgame_游戏;yt1:游戏", "opstate": "0,66", "p": "1571274126", "pcurl": "https://www.360kuai.com/9087f421a5423177d?refer_scene=\u0026scene=\u0026sign=360_fc624efc\u0026tj_url=9087f421a5423177d\u0026uid=bcbe314c662be3897829aff89343c26d", "playType": 0, "playcnt": "106", "postfix": "", "ptid": "", "pv": "0", "r": "674d07a00aea85e2", "rawurl": "http://video.news.so.com/01c02538183c79cbcb09bf5f7ca07a24", "recalltag": "NULL__0__0", "recalltype": "qtest", "refer": "", "relateUrl": "http://m.look.360.cn/relate?sign=360_fc624efc\u0026wid=bcbe314c662be3897829aff89343c26d\u0026url=http%3A%2F%2Fvideo%2Enews%2Eso%2Ecom%2F01c02538183c79cbcb09bf5f7ca07a24\u0026refer=list\u0026rel_pos=0\u0026ser=0\u0026a_id=video_detail\u0026b_id=0", "rot": "0", "rpt": "0748b630b9881a6d", "rptid": "9c5125647d8f779587180959b3823c443a347f0d", "s": "y", "sex_score": "0", "showtime": "1571999478", "source": "qt:levelL|qt:gamepop,otherc,sts0,game,fts0,art_src_1,nbbrs_1173_4,nbbr_NULL__0__0,nbbc_NULL,rtype_qtest,nbbp_qtest,from_c,nbby_AWJlZ2luX3RpbWUCNzI=,nbbrext_qrecall:,qtest,uusdkother_0,nbbh_merger296.se.zzzc,uusdkother,,wspuser_3beijing,nbbe_a1616,nbbe_rankk1490,,nbbg_9087f421a5423177d,nbbu_q111:,nbbtm_1571999478,nbbs_0:8", "stag": "游戏", "t": "我的世界联机第七季29：去星哥家借甘蔗，做出装备强化台", "type": "newgood", "u": "https://www.360kuai.com/mob/transcoding?url=http%3A%2F%2Fvideo.news.so.com%2F01c02538183c79cbcb09bf5f7ca07a24\u0026check=9c63ccb6bc9eb7d1\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360%5Ffc624efc\u0026v=1\u0026sv=8\u0026templetctl=7\u0026360newsdetail=1\u0026articlety=zmt\u0026hsitetype=1\u0026ucheck=362e2034707531e2e29ea55880905a2d\u0026hscmt=1", "ucheck": "362e2034707531e2e29ea55880905a2d", "vid": "", "videoUrl": "http://api.look.360.cn/video/detail?id=9087f421a5423177d\u0026sign=360_fc624efc\u0026uid=bcbe314c662be3897829aff89343c26d\u0026c=youlike\u0026ucheck=362e2034707531e2e29ea55880905a2d\u0026sdk_youlike_tv=1\u0026is_new_recom=1", "x": "0", "zan_num": "0", "zmid": "sq_268761040", "zmt": { "id": "268761040", "name": "风行视频", "pic": "https://p.ssl.qhimg.com/dmfd/128_128_80/t010d44a5c30eace11d.png", "textimg": "https://p.ssl.qhimg.com/bl/0_3/video/360_202_/t017bc939e922a141b8.jpg?size=1920x1080" } }, { "a": "h", "c": "sport", "cai_num": "0", "cicon": "http://p0.qhimg.com/t01490a227ef6061360.png", "city_label": "", "cmt_num": "0", "display": { "cicon": "0", "cmt": "0", "from": "1", "fromicon": "0", "time": "1" }, "f": "", "filter": "卡纳瓦罗|广州恒大|塔利斯卡", "fkws": "中国足球|外援|中超||忍无可忍|大牌|榜首|卡纳瓦罗", "fromicon": "", "fword": "", "gnid": "935f603b0e331cc99", "gzhid": "2798515934", "h": "0", "i": "https://p0.ssl.qhimgs4.com/dmfd/182_136_/t013e49ae7b3ef83b18.jpg?size=640x383|https://p0.ssl.qhimgs4.com/dmfd/182_136_/t01111b33d82da31435.jpg?size=640x342|https://p0.ssl.qhimgs4.com/dmfd/182_136_/t019406685f05bff19b.jpg?size=640x362", "idx": "7", "in": "", "j": "体育;外援|榜首|大牌|卡纳瓦罗|中超|忍无可忍", "m": "8681e1b65cd864639bb5628c6640fcc7f4aacbcb", "nlabel": "stat_2798515934:zm.news.so.com:55CD6L+35bGL,pageType_zmt,glevel_3", "ntag": "csport_P:全类:中超:恒大;yt2:体育:足球;yt3:体育:足球:中国足球;csport_S:5:m28335:中超:外援;mk1332_31;ssport_中国足球;yt1:体育;csport_P:体育:埃弗拉:黄博文;csport_S:5:5199:中超:金靴;y1:体育;mk500_301;csport_S:5:11802:外援:中超;y2:体育:足球;csport_S:5:13635:恒大:中超;ksport_1:中超;tsport;csport_S:5:a39433:国足:恒大;csport_S:5:m30674:恒大:上港;ksport_1:卡纳瓦罗;call_P:全类:中超:恒大;tagid:;y3:体育:足球:中国足球;csport_P:体育:足协杯:高拉特", "opstate": "100,66", "p": "1571525851", "pcurl": "https://www.360kuai.com/935f603b0e331cc99?refer_scene=\u0026scene=\u0026sign=360_fc624efc\u0026tj_url=935f603b0e331cc99\u0026uid=bcbe314c662be3897829aff89343c26d", "ptid": "a702|a3298|a3014", "pv": "0", "r": "e3e2792bdc1a03c5", "rawurl": "http://zm.news.so.com/c354de4bae6b1191bf60726d664df3cb", "recalltag": "NULL__0__0", "recalltype": "qtest", "refer": "", "rot": "0", "rpt": "039f86407d46ddaa", "s": "t", "sex_score": "0", "showtime": "1571999478", "source": "piece_time,sts3,fts3,qt:levelH|qt:sportpop,art_src_1,sport,nbbrs_856_7,nbbr_NULL__0__0,nbbc_NULL,rtype_qtest,nbbp_qtest,from_c,nbby_AWJlZ2luX3RpbWUCNzI=,nbbrext_qrecall:,qtest,uusdkother_0,nbbh_merger296.se.zzzc,uusdkother,,wspuser_3beijing,nbbe_a1616,nbbe_rankk1490,,nbbg_935f603b0e331cc99,nbbu_q111:,nbbtm_1571999478,nbbs_0:9", "stag": "体育|中国足球", "t": "一场3-2让中超榜首巩固优势，卡纳瓦罗忍无可忍，换下大牌外援", "type": "newgood", "u": "https://www.360kuai.com/mob/transcoding?url=http%3A%2F%2Fzm.news.so.com%2Fc354de4bae6b1191bf60726d664df3cb\u0026check=8ff3d3f717a4af8c\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360%5Ffc624efc\u0026v=1\u0026sv=8\u0026templetctl=7\u0026360newsdetail=1\u0026articlety=zmt\u0026hsitetype=1\u0026ucheck=f632a91553d60a4dc79e8d168c1909cf\u0026hscmt=1", "ucheck": "f632a91553d60a4dc79e8d168c1909cf", "x": "0", "zan_num": "0", "zmid": "sq_2798515934", "zmt": { "id": "2798515934", "name": "球迷屋", "pic": "https://p.ssl.qhimg.com/dmfd/128_128_80/t01d30e95e8b8d11602.jpg", "textimg": "https://p0.ssl.qhimgs4.com/bl/0_3/t01111b33d82da31435.jpg?size=640x342" } }, { "a": "h", "attr": [{ "name": "video", "pos": 2 }], "c": "funny", "cai_num": "0", "cicon": "http://p0.qhimg.com/t01b3ec0699f69cc555.png", "city_label": "", "cmt_num": "0", "content": "画都画不……卧槽", "debug_cmt_num": "-", "description": "", "display": { "cicon": "0", "cmt": "0", "from": "1", "fromicon": "0", "time": "1", "y2h5": "1" }, "duration": "4", "exData": "eyJjb2RlIjoiOWMxYWVlOTU0YWNhMjFjZDYiLCJwaWNVcmwiOiJodHRwczovL3Auc3NsLnFoaW1nLmNvbS90MDEwOTQ5YjJmNTFhNTdlY2I4LmpwZyIsInBsYXlDbnQiOiIwIiwicGxheUxpbmsiOiJodHRwOi8vYXBpLmxvb2suMzYwLmNuL3ZpZGVvL2RldGFpbD9pZD05YzFhZWU5NTRhY2EyMWNkNlx1MDAyNnNpZ249MzYwX2ZjNjI0ZWZjXHUwMDI2dWlkPWJjYmUzMTRjNjYyYmUzODk3ODI5YWZmODkzNDNjMjZkXHUwMDI2Yz15b3VsaWtlXHUwMDI2dWNoZWNrPWE1ZDk5NjY0NmE1ZmQyODFiZTQ0MjEzZDZiNDRjMWNiXHUwMDI2c2RrX3lvdWxpa2VfdHY9MVx1MDAyNmlzX25ld19yZWNvbT0xIiwidG90YWxUaW1lU3RyIjoiMDE6MDkifQ==", "f": "", "filter": "", "fkws": "", "fromicon": "", "fword": "", "gnid": "9c1aee954aca21cd6", "gzhid": "3028079675", "h": "0", "h5url": "", "i": "https://p.ssl.qhimg.com/video/360_202_/t010949b2f51a57ecb8.jpg", "idx": "5", "in": "", "j": "搞笑;", "m": "66ef181634967f982c11430457a23cab11abaf5", "nlabel": "stat_3028079675:video.news.so.com:54iG57Gz6Iqx6KeG6aKR,pageType_zmt:video", "ntag": "y3:文化:收藏:鉴宝;cart_S:5:m36783:插画:一幅;y1:文化;yt2:文化:收藏;tfunny;yt3:文化:收藏:鉴宝;mk1332_1;mk1332_130;tagid:;cart_S:5:a39491:书法:作品展;mk500_70;sfunny_搞笑;y2:文化:收藏;cart_S:5:13640:画画:手绘;yt1:文化", "opstate": "0,66", "p": "1571270524", "pcurl": "https://www.360kuai.com/9c1aee954aca21cd6?refer_scene=\u0026scene=\u0026sign=360_fc624efc\u0026tj_url=9c1aee954aca21cd6\u0026uid=bcbe314c662be3897829aff89343c26d", "playType": 0, "playcnt": "0", "postfix": "", "ptid": "", "pv": "0", "r": "d91eab38f7d6c494", "rawurl": "http://video.news.so.com/044433b91aa5290d9b4f77faf6ab3ba5", "recalltag": "NULL__0__0", "recalltype": "qtest", "refer": "", "relateUrl": "http://m.look.360.cn/relate?sign=360_fc624efc\u0026wid=bcbe314c662be3897829aff89343c26d\u0026url=http%3A%2F%2Fvideo%2Enews%2Eso%2Ecom%2F044433b91aa5290d9b4f77faf6ab3ba5\u0026refer=list\u0026rel_pos=0\u0026ser=0\u0026a_id=video_detail\u0026b_id=0", "rot": "0", "rpt": "52afc7e220d74933", "rptid": "66ef181634967f982c11430457a23cab11abaf5", "s": "y", "sex_score": "0", "showtime": "1571999478", "source": "sensational,funny,sts0,weak,qt:levelL,fts0,art_src_1,qgc,nbbrs_1100_5,nbbr_NULL__0__0,nbbc_NULL,rtype_qtest,nbbp_qtest,from_c,nbby_AWJlZ2luX3RpbWUCNzI=,nbbrext_qrecall:,qtest,uusdkother_0,nbbh_merger296.se.zzzc,uusdkother,,wspuser_3beijing,nbbe_a1616,nbbe_rankk1490,,nbbg_9c1aee954aca21cd6,nbbu_q111:,nbbtm_1571999478,nbbs_0:10", "stag": "搞笑", "t": "画都画不……卧槽", "type": "newgood", "u": "https://www.360kuai.com/mob/transcoding?url=http%3A%2F%2Fvideo.news.so.com%2F044433b91aa5290d9b4f77faf6ab3ba5\u0026check=0bc35bb65e0e740e\u0026uid=bcbe314c662be3897829aff89343c26d\u0026sign=360%5Ffc624efc\u0026v=1\u0026sv=8\u0026templetctl=7\u0026360newsdetail=1\u0026articlety=zmt\u0026hsitetype=1\u0026ucheck=a5d996646a5fd281be44213d6b44c1cb\u0026hscmt=1", "ucheck": "a5d996646a5fd281be44213d6b44c1cb", "vid": "", "videoUrl": "http://api.look.360.cn/video/detail?id=9c1aee954aca21cd6\u0026sign=360_fc624efc\u0026uid=bcbe314c662be3897829aff89343c26d\u0026c=youlike\u0026ucheck=a5d996646a5fd281be44213d6b44c1cb\u0026sdk_youlike_tv=1\u0026is_new_recom=1", "x": "0", "zan_num": "0", "zmid": "sq_3028079675", "zmt": { "id": "3028079675", "name": "爆米花视频", "pic": "https://p.ssl.qhimg.com/dmfd/128_128_80/t0143d9513a4bfc66f7.png", "textimg": "https://p.ssl.qhimg.com/bl/0_3/video/360_202_/t010949b2f51a57ecb8.jpg" } }], "version": "v1" }, "errmsg": "", "errno": 0, "ext": { "clickUrl": "", "listUrl": "http://papi.look.360.cn/mlist" }, "sid": "2c8e04377b679b1c8222c191239b1f98", "uid": "bcbe314c662be3897829aff89343c26d", "v": 1 });
                            // sData.data.res[1] = sData.data.res[0];
                            // sData.data.res[2] = sData.data.res[0];
                            // sData.data.res[3] = sData.data.res[0];

                            if (self.noData) {
                                return;
                            }

                            if (sData && sData.data && sData.data.res) {
                                if (sData.data.res.length) {
                                    baodian.countBatch(self);
                                    baodian.sid = sData.sid;

                                    var formatData = self.Source.baoDian.formatData(self, sData.data.res);
                                    formatData.length && self.render(formatData);

                                    baodian.showLog(self);

                                    baodian.baodianPage++;
                                } else {
                                    self.setNoData();
                                }
                            }
                        }
                    });
                },
                formatData: function (self, sData) {
                    var data = [];
                    var sDataI = {};
                    var type = self.options.type;
                    var baodian = self.Source.baoDian;

                    var delData = NewsFlow.Tools.localStorage.getItem(baodian.delNewsCookie);
                    delData = delData ? JSON.parse(delData) : [];

                    for (var i = 0, len = sData.length; i < len; i++) {
                        sDataI = sData[i];
                        var cat = 'news';

                        if (~$.inArray(sDataI.t, delData)) { continue; }

                        if ((type != 'youlike' && !~$.inArray(sDataI.s, ['t', 'p', 'q'])) || (type == 'youlike' && !~$.inArray(sDataI.s, ['t', 'p', 'q', 'y']))) { // t:文本 p:图集 q:趣图 y:视频
                            // console.log('未知类型', sDataI.s);
                            continue;
                        }

                        // 实际展现打点
                        var log = [];
                        log.push(sDataI.gnid || '');
                        log.push(sDataI.a || '');
                        log.push(sDataI.c || '');
                        log.push(sDataI.source || '');
                        log.push(sDataI.s || '');
                        log.push(sDataI.style || '');
                        log.push(2000);
                        log.push(self.sid || '');
                        log = ' data-log=\'' + JSON.stringify(log) + '\'';

                        var date = sDataI.showtime * 1000;
                        var liClass = '';
                        var playcnt = '';
                        var corner = '';

                        // 置顶
                        if (sDataI.a == 't' && sDataI.attr && sDataI.attr[0] && sDataI.attr[0].isdisplay == '1' && sDataI.attr[0].content == '置顶') {
                            var attr = sDataI.attr[0];
                            date = '<span style="color:#' + attr.color + '">' + attr.content + '</span>';
                            liClass = 'to-front';
                        }

                        // 视频
                        var covers = sDataI.i && sDataI.i.split('|') || [];
                        if (sDataI.s == 'y' && sDataI.duration && covers.length == 1) {
                            cat = 'video';
                            corner = NewsFlow.Tools.formatSeconds(sDataI.duration);
                            playcnt = +sDataI.playcnt ? '<span>' + sDataI.playcnt + '次观看</span>' : '';
                        }

                        data.push({
                            type: cat,
                            playCount: playcnt,
                            liClass: liClass,
                            date: date,
                            title: sDataI.t,
                            from: '',
                            url: sDataI.pcurl,
                            source: sDataI.f,
                            covers: covers,
                            corner: corner,
                            coversCount: sDataI.s == 'p' && sDataI.pnum >= 4 ? sDataI.pnum : '',
                            attr: '" data-callbackUrl="' + sDataI.u + '" data-a="' + sDataI.a + '" data-c="' + sDataI.c + '" data-src="' + sDataI.source + '" data-s="' + sDataI.s + '"' + log
                        });
                    }
                    return data;
                }
            }
        },
        clearUpData: function (sData) { // 将数据整理成统一格式
            var self = this;
            var data = [];
            var item = {};
            var dataI;

            for (var i = 0, len = sData.length; i < len; i++) {
                dataI = sData[i];

                var sTitle = dataI.title;
                var options = self.options;
                var sCovers = dataI.covers;

                item = {
                    dataSource: options.source,
                    from: dataI.from,
                    type: dataI.type,
                    playCount: dataI.playCount,
                    source: dataI.source,
                    title: '',
                    titleLong: sTitle,
                    titleFull: $.trim(NewsFlow.Tools.getTxt(sTitle)),
                    corner: dataI.corner,
                    covers: [],
                    coversWidth: 0,
                    coversHeight: 0,
                    liCoversClass: '',
                    url: dataI.url,
                    date: dataI.date,
                    liClass: dataI.liClass + ' ' + dataI.type,
                    attr: dataI.attr,
                    tag: ''
                };

                if ($.isNumeric(item.date)) {
                    item.date = '<span>' + NewsFlow.Tools.formatTime(new Date(item.date), 'yyyy-MM-dd hh:mm', 1).replace(' 00:00', '') + '</span>';
                }

                if (item.source) {
                    item.source = '<span>' + item.source + '</span>';
                }

                if (options.isShowTag && dataI.tag) {
                    item.tag = '<span class="tag">' + dataI.tag + '</span>';
                }

                if (dataI.type == 'atlas') {    // 图集
                    item.covers = sCovers.slice(0, 2);
                    item.coversWidth = options.atlasImg.width;
                    item.coversHeight = options.atlasImg.height;
                    for (var c = 0, cLen = item.covers.length; c < cLen; c++) {
                        var src = NewsFlow.Tools.sslReplace(NewsFlow.Tools.getPicUrl(item.covers[c], '/dmt/' + item.coversWidth + '_' + item.coversHeight + '_'));
                        item.covers[c] = { style: ' class="anim"', src: src };
                    }
                    item.title = sTitle;
                } else if (sCovers.length >= options.manyImg.count && !options.onlyShowSingleImg) {   // 多图
                    if (!options.manyImg.isShowCorner) {
                        item.corner = '';
                    }
                    item.covers = sCovers.slice(0, options.manyImg.count);
                    item.coversWidth = options.manyImg.width;
                    item.coversHeight = options.manyImg.height;
                    for (var c = 0, cLen = item.covers.length; c < cLen; c++) {
                        var src = NewsFlow.Tools.sslReplace(NewsFlow.Tools.getPicUrl(item.covers[c], '/dmt/' + item.coversWidth + '_' + item.coversHeight + '_'));
                        item.covers[c] = { style: ' class="anim"', src: src };
                    }
                    item.title = sTitle;
                } else if (sCovers.length > 0) {   // 单图
                    if (dataI.type !== 'video') {
                        item.corner = '';
                    }
                    item.liCoversClass = 'single-img';
                    item.covers = sCovers.slice(0, 1);
                    item.coversWidth = options.singleImg.width;
                    item.coversHeight = options.singleImg.height;
                    var src = NewsFlow.Tools.sslReplace(NewsFlow.Tools.getPicUrl(item.covers[0], '/dmt/' + item.coversWidth + '_' + item.coversHeight + '_'));
                    item.covers[0] = { style: ' class="anim"', src: src };
                    item.title = NewsFlow.Tools.cutStr(sTitle, options.singleImg.titleLength);
                } else if (!options.onlyShowSingleImg) {  // 无图
                    item.title = NewsFlow.Tools.cutStr(sTitle, options.noImg.titleLength);
                }
                item.title = NewsFlow.Tools.unescapeHTML(item.title);

                data.push(item);
            }
            return data;
        },
        hideLoading: function () {  // 隐藏loading
            var self = this;
            self.$loading.hide();
        },
        render: function (data, noRender) { // 渲染dom
            var self = this;
            var options = self.options;
            var eventMark = options.eventMark;


            data = self.clearUpData(data);  // 整理后的数据
            // console.log(data);

            var html = [];
            for (var i = 0; i < data.length; i++) {
                html.push(NewsFlow.Tools.template(options.template, $.extend(data[i], { tplType: 'news' })));
            }
            self.$flowInner.append(html.join(''));

            setTimeout(function () {
                options.renderAfterCb(self);
                !noRender && NewsFlow.Tools.observer.publish(eventMark + '.rendered');
            }, 0);

            self.sendLog({ type: 'flow-ajax' });
        },
        getData: function (params) {    // 获取数据
            var self = this;
            self.Source[self.options.source].getData.call(this, params);
        },
        setNoData: function (getDataParams) {   // 无数据处理
            var self = this;
            var options = self.options;
            var liLen = options.$newsFlow.find('li').length;

            // 无数据、超时，重新尝试请求数据
            if (self.currRetryGetDataTimes < options.retryGetDataTimes) {
                self.currRetryGetDataTimes++;
                self.getData(getDataParams);
                return;
            }

            if (self.noData) {
                return;
            }

            self.noData = true;

            options.noDataCb(self, liLen);

            self.hideLoading();
            if (liLen > 0) {   // 流中有数据，隐藏loading，添加无更多数据
                self.$flowInner.after(NewsFlow.Tools.template(options.template, { tplType: 'noData' }));
            } else {    // 流中无数据，删除流
                self.removeFlow();
            }
        },
        removeFlow: function () {   // 删除流
            var self = this;
            var options = self.options;

            options.removeFlowCb(self);

            if (options.alwaysShowFlow == true) { // 流常驻，不删除
                return;
            }

            options.$newsFlow.remove();
        },
        gotoTop: function () {  // 返回顶部
            var self = this;

            if (!self.options.showGotoTop) {
                return;
            }

            if ($(window).scrollTop() > self.options.gotoTopDis) {
                self.$gotoTop.fadeIn();
            } else {
                self.$gotoTop.fadeOut();
            }
        },
        scrollLoad: function (self) {   // 加载流
            self = self || this;

            if (self.noData) {
                return;
            }
            var options = self.options;
            var $window = $(window);
            var windowHeight = $window.height();

            // 流的内容不足2屏，自动补充
            if ($(document).height() - $window.scrollTop() - windowHeight < windowHeight) {
                self.getData();
                if (options.$newsFlow.find('li').length) {
                    self.$loading.show();
                }
            }
        },
        sendLog: function (params) { // 发送业务打点
            var options = this.options;
            NewsFlow.Tools.log(options.logMark, $.extend({
                p1: options.from,
                p2: options.source,
                datatype: options.type,
                abid: options.$newsFlow.attr('data-abtest-id')
            }, params));
        },
        eventBind: function () {
            var self = this;
            var options = self.options;
            var $window = $(window);
            var eventMark = options.eventMark;
            var noDotEventMark = options.eventMark.replace(/\./g, '');
            var $newsFlow = options.$newsFlow;

            // window滚动事件
            var timerScroll;
            var preScrollTop = 0;
            $window.off('.' + noDotEventMark + 'WinScroll').on('scroll.' + noDotEventMark + 'WinScroll.haosou', function (e) {
                if (!$newsFlow.is(':visible') || self.noData) {
                    return;
                }

                options.scrollCb(self);

                if (!options.preventScrollLoad) {
                    clearTimeout(timerScroll);
                    timerScroll = setTimeout(function () {
                        self.scrollLoad(self);
                    }, 500);
                }

                options.showGotoTop && self.gotoTop();

                NewsFlow.Tools.observer.publish(eventMark + '.scroll', $window.scrollTop() > preScrollTop); // 额外打点
                preScrollTop = $window.scrollTop();

            });

            // 返回顶部
            self.$gotoTop.on('click', function () {
                self.sendLog({ type: 'go-top' });
                $('html, body').animate({ scrollTop: 0 }, 300);
            }).appendTo($('body'));

            // 点击流事件
            var timer;
            $newsFlow.on('click', function (e) {
                var $target = $(e.target);
                var $li = $target.closest('li[data-from^="news"]');
                var sourceObj = self.Source[self.options.source];

                if (!$li.length) {
                    return;
                }

                if ($target.is('.close-list a')) {	// 删除新闻
                    var closeLog = sourceObj.closeLog;
                    closeLog && closeLog(self, $li);

                    self.sendLog({
                        type: 'close-news',
                        value: $target.attr('data-val')
                    });

                    $li.slideUp(100, function () {
                        $li.remove();
                        if (!$newsFlow.find('li').length) {
                            self.removeFlow();
                        }

                        NewsFlow.Tools.observer.publish(eventMark + '.flowHeightChange');
                    });

                    self.addNews();
                } else if ($target.closest('a').length) {	// 新闻打点
                    var sendLog = function (type) {
                        self.sendLog({
                            type: type,
                            pos: $li.index() + 1,
                            p3: $li.attr('data-log-extend'),
                            value: $target.attr('data-log'),
                            urls: $li.find('a:eq(0)').attr('data-mdurl') || $li.find('a:eq(0)').attr('href'),
                            viewtype: $li.find('.sub-title').text(),
                            source: $li.find('.tag').text(),
                            template: $li.attr('data-type')
                        });
                    };
                    var clickLog = sourceObj.clickLog;
                    clickLog && clickLog(self, $li);

                    if ($target.is('.desc .tag')) { //tag
                        sendLog('flow-click-tag');
                        location.href = "//www.so.com/s?src=soflow_tag&q=" + encodeURIComponent($target.text());
                        return false;
                    } else {
                        sendLog('flow-click');
                    }
                }
                console.log($target.is('.desc .tag'));
            }).on('mouseenter', 'div.close', function (e) { // 关闭列表
                $(e.target).closest('li').addClass('curr');
                $newsFlow.find('div.close').removeClass('hover');
                $newsFlow.find('.close-list').remove();
                clearTimeout(timer);
                $(this).addClass('hover').append(NewsFlow.Tools.template(options.template, { tplType: 'closeList' }));
            }).on('mouseleave', 'div.close', function (e) { // 关闭列表
                var $this = $(this);
                $(e.target).closest('li').removeClass('curr');
                clearTimeout(timer);
                timer = setTimeout(function () {
                    $this.removeClass('hover').find('.close-list').remove();
                }, 200);
            });
        },
        addNews: function () {  // 补充新闻
            var self = this;
            var options = self.options;

            if (self.noData) {
                return;
            }

            if (options.addNewsCb != $.noop) {
                options.addNewsCb(self);
            } else {
                self.scrollLoad();
            }
        },
        subscribe: function () {
            var self = this;
            var eventMark = self.options.eventMark;

            // 补充新闻
            NewsFlow.Tools.observer.subscribe(eventMark + '.addNews', function () {
                self.addNews();
            });

            // 关闭流
            NewsFlow.Tools.observer.subscribe(eventMark + '.closeFlow', function () {
                self.removeFlow();
            });
        },
        init: function () {
            var self = this;
            var options = self.options;
            options.initCb(self);
            self.eventBind();
            self.subscribe();
            self.sendLog({ type: 'show' });
            self.$flowInner.after(self.$loading);    // 添加loading
            options.showGotoTop && self.$gotoTop.appendTo($('body')); // 添加返回顶部
        }
    };
})();